/*********************************************************************\
*                                                                     *
*         Jamper - Java XML mapper (visual XSLT generator)            *
*                Copyright (C) 2005 Filip Pavlovic                    *
*                    sqba@users.sourceforge.net                       *
*                                                                     *
*  This program is free software; you can redistribute it and/or      *
*  modify it under the terms of the GNU General Public License        *
*  as published by the Free Software Foundation; either version 2     *
*  of the License, or (at your option) any later version.             *
*                                                                     *
*  This program is distributed in the hope that it will be useful,    *
*  but WITHOUT ANY WARRANTY; without even the implied warranty of     *
*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the      *
*  GNU General Public License for more details.                       *
*                                                                     *
*  You should have received a copy of the GNU General Public License  *
*  along with this program; if not, write to the Free Software        *
*  Foundation, Inc., 59 Temple Place - Suite 330, Boston,             *
*  MA 02111-1307, USA.                                                *
*                                                                     *
\*********************************************************************/


package sqba.jamper.map;



/**
 * Wrapper class for object properties.
 *
 * @author	Filip Pavlovic
 * @version	1.0
 */
public class ObjectProperty
{
	private IPropObject	_parent	= null;
	private String		_name	= "";
	private Object		_value	= null;
	
	public ObjectProperty(IPropObject parent, String name, Object value)
	{
		_parent = parent;
		_name   = name;
		_value  = value;
	}
	
	public String toString()
	{
		return _name + " = '" + _value + "'";
	}

	public String getName()				{ return _name; }
	public void setName(String name)	{ _name = name; }

	public Object getValue()			{ return _value; }
	public void setValue(Object value)
	{
		_value = value;
		_parent.propertyUpdated(this);
	}
}
